﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:n="http://nRoute/schemas/2010/xaml"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
	x:Class="nRoute.Samples.SiteMapModule.Views.Orders"
    mc:Ignorable="d"
    d:DesignWidth="640" d:DesignHeight="480">
    
	<i:Interaction.Behaviors>
		<n:BridgeViewModelBehavior/>
	</i:Interaction.Behaviors>
    
    <Grid x:Name="LayoutRoot" Background="White">
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="215"/>
    		<ColumnDefinition/>
    	</Grid.ColumnDefinitions>
		<Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}" 
			VerticalAlignment="Stretch" Margin="-20,-15,12,-20" Height="Auto" Background="{StaticResource AccentColorBrush}" >
			<ItemsControl ItemsSource="{Binding SiteMapNodes}" Margin="0,5,0,0">
    				<ItemsControl.ItemsPanel>
    					<ItemsPanelTemplate>
    						<StackPanel Orientation="Vertical" />
    					</ItemsPanelTemplate>       		
    				</ItemsControl.ItemsPanel>	        	
    				<ItemsControl.ItemTemplate>
    					<DataTemplate>
    						<HyperlinkButton Style="{StaticResource LinkStyle}" Content="{Binding Title}" 
    							ToolTipService.ToolTip="{Binding Description}" BorderThickness="0" 
								HorizontalContentAlignment="Left" BorderBrush="{x:Null}" Padding="17,8" >
    							<i:Interaction.Triggers>
    								<i:EventTrigger EventName="Click">
    									<n:NavigateNodeAction NavigationNode="{Binding}" HandlerName="OrderDetailsHandler"/>
    								</i:EventTrigger>
    							</i:Interaction.Triggers>
    						</HyperlinkButton>
    					</DataTemplate>
    				</ItemsControl.ItemTemplate>
    			</ItemsControl>  
			</Border>           
    	<n:NavigationContainer Grid.Column="1">
    		<i:Interaction.Behaviors>
    			<n:NavigationHandlerBehavior HandlerName="OrderDetailsHandler"/>
    		</i:Interaction.Behaviors>
    	</n:NavigationContainer>
    </Grid>
</UserControl>
